<template>
    <div>
        <h1>首页</h1>
        <button @click="gotoAbout">跳转到关于页面</button>
    </div>
</template>

<script setup>
import { useRouter } from 'vue-router'
const router = useRouter()
const gotoAbout = () => {
    router.push('/about')
}
</script>

<style scoped></style>